import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import Login from '../views/Login.vue'
import Index from '../views/Index.vue'
import First from '../views/public/First.vue'
import History from '../views/public/History.vue'
import Medal from '../views/public/Medal.vue'
import Fans from '../views/public/Fans.vue'
import Register from '../views/Register.vue'
import Verification from '../views/Verification.vue'
import Setpassword from '../views/Setpassword.vue'

import Sushiservice from '../views/njrviews/Sushiservice.vue'
import Partner from '../views/njrviews/Partner.vue'
import Usercenter from '../views/njrviews/Usercenter.vue'
import Userinfo from '../views/njrviews/usercenterchildren/Userinfo.vue'
import Coincord from '../views/njrviews/usercenterchildren/Coincord.vue'
import Output from '../views/njrviews/usercenterchildren/Output.vue'
import Input from '../views/njrviews/usercenterchildren/Input.vue'
import Power from '../views/njrviews/usercenterchildren/Power.vue'
import Clock from '../views/njrviews/usercenterchildren/Clock.vue'
// 首页下的跳转路由
import Brush from '../views/njrviews/firstview/Brush.vue'
import Howbrush from '../views/njrviews/firstview/Howbrush.vue'
import Electric from '../views/njrviews/firstview/Electric.vue'
import Device from '../views/njrviews/firstview/Device.vue'
import Bindon from '../views/njrviews/firstview/Bindon.vue'
import Pair from '../views/njrviews/firstview/Pair.vue'
import Brushhead from '../views/njrviews/firstview/Brushhead.vue'
import IThead from '../views/njrviews/firstview/IThead.vue'
import Whyexchange from '../views/njrviews/firstview/Whyexchange.vue'
import Share from '../views/njrviews/firstview/Share.vue'

// 个人中心下的个人信息底下的跳转路由
import Editage from '../views/njrviews/usercenterchildren/userinforouter/Editage.vue'
import Editpassword from '../views/njrviews/usercenterchildren/userinforouter/Editpassword.vue'
import Editnewpass from '../views/njrviews/usercenterchildren/userinforouter/Editnewpass.vue'
import Editsex from '../views/njrviews/usercenterchildren/userinforouter/Editsex.vue'
import Editteeth from '../views/njrviews/usercenterchildren/userinforouter/Editteeth.vue'
import Edityesteeth from '../views/njrviews/usercenterchildren/userinforouter/Edityesteeth.vue'
import Editusername from '../views/njrviews/usercenterchildren/userinforouter/Editusername.vue'
import Editwhite from '../views/njrviews/usercenterchildren/userinforouter/Editwhite.vue'
import Connent from '../components/xzlcomponents/Connent.vue'
// 马泽华的路由
import Shop from '@/components/mzhcomponents/fans_body_shop.vue'
import Activities from '@/components/mzhcomponents/fans_body_activities.vue'
import Order from '@/components/mzhcomponents/fans_header_order.vue'
import Question from '@/components/mzhcomponents/fans_header_question.vue'
import Details from '@/components/mzhcomponents/fans_shop_details.vue'
import Recharge from '@/components/mzhcomponents/recharge.vue'
import Search from '@/components/mzhcomponents/fans_search.vue'
import Coinexchange from '@/components/mzhcomponents/coinexchange.vue'
import Consulting from '@/components/mzhcomponents/consulting.vue'

//yj的路由
import Aboutus from '../views/yjviews/Aboutus.vue'
import Introduction from '../views/yjviews/Introduction.vue'
import Useragreement from '../views/yjviews/aboutus/Useragreement.vue'
import Contactus from '../views/yjviews/aboutus/Contactus.vue'
import Beginner from '../views/yjviews/introduction/Beginner.vue'
import Faq from '../views/yjviews/introduction/Faq.vue'
import Instructions from '../views/yjviews/introduction/Instructions.vue'
import Quicktour from '../views/yjviews/introduction/Quicktour.vue'

//丁浪的路由
import Imgone from '../views/Medal/Imgone.vue'
import Imgtwo from '../views/Medal/Imgtwo.vue'
import Imgthree from '../views/Medal/Imgthree.vue'
import Imgfour from '../views/Medal/Imgfour.vue'
import Weibo from '../views/Medal/Weibo.vue'
import Zhuce from '../views/Medal/Zhuce.vue'
import Shouji from '../views/Medal/Shouji.vue'
import Youxiang from '../views/Medal/Youxiang.vue'
import Help from '../views/Medal/Medal_help.vue'

//许志良的路由
import Day from '../components/xzlcomponents/Day/Day.vue'
import Mor from '../components/xzlcomponents/Day/Mor.vue'
import Tmor from '../components/xzlcomponents/Day/Tmor.vue'
import Month from '../components/xzlcomponents/Month/Month.vue'
import Week from '../components/xzlcomponents/Week/Week.vue'
import Quarter from '../components/xzlcomponents/Quarter/Quarter.vue'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        name: 'Home',
        component: Home
    },
    // 登录页面
    {
        path: '/login',
        name: 'Login',
        component: Login
    },
    {
        path: '/connent',
        name: 'Connent',
        component: Connent
    },
    // 注册页面
    {
        path: '/register',
        name: 'Register',
        component: Register
    },
    // 验证码页面
    {
        path: '/verification',
        name: 'Verification',
        component: Verification
    },

    // 设置密码页面
    {
        path: '/setpassword',
        name: 'Setpassword',
        component: Setpassword
    },
//丁浪的路由
    {
        path: '/help',
        name: 'Help',
        component: Help
    },
    {
        path: '/medal/imgone',
        name: 'Imgone',
        component: Imgone
    },
    {
        path: '/medal/imgtwo',
        name: 'Imgtwo',
        component: Imgtwo
    },
    {
        path: '/medal/imgthree',
        name: 'Imgthree',
        component: Imgthree
    },
    {
        path: '/medal/imgfour',
        name: 'Imgfour',
        component: Imgfour
    },
    {
        path: '/medal/weibo',
        name: 'Weibo',
        component: Weibo
    },
    {
        path: '/medal/zhuce',
        name: 'Zhuce',
        component: Zhuce,
        redirect: '/medal/zhuce/shouji',
        children: [{
                path: 'shouji',
                name: "Shouji",
                component: Shouji,
            },
            {
                path: 'youxiang',
                name: "Youxiang",
                component: Youxiang
            }
        ]
    },
    //功能介绍
    {
        path: '/introduction',
        name: 'Introduction',
        component: Introduction
    },
    {
        path: '/introduction/beginner',
        name: 'Beginner',
        component: Beginner
    },
    {
        path: '/introduction/faq',
        name: 'Faq',
        component: Faq
    },
    {
        path: '/introduction/instructions',
        name: 'Instructions',
        component: Instructions
    },
    {
        path: '/introduction/quicktour',
        name: 'Quicktour',
        component: Quicktour
    },
    //关于我们
    {
        path: '/aboutus',
        name: 'Aboutus',
        component: Aboutus,
    },
    {
        path: '/aboutus/useragreement',
        name: 'Useragreement',
        component: Useragreement
    },
    {
        path: '/aboutus/contactus',
        name: 'Contactus',
        component: Contactus
    },
    // 素士客服
    {
        path: '/sushiservice',
        name: 'Sushiservice',
        component: Sushiservice
    },
    // 合作商家
    {
        path: '/partner',
        name: 'Partner',
        component: Partner
    },
    // mzh路由内容
    {
        path: '/order',
        name: 'Order',
        component: Order
    },
    {
        path: '/question',
        name: 'Question',
        component: Question
    },
    {
        path: '/details',
        name: 'Details',
        component: Details
    },
    {
        path: '/recharge',
        name: 'Recharge',
        component: Recharge

    },
    {
        path: '/search',
        name: 'Search',
        component: Search

    },
    {
        path: '/coinexchange',
        name: 'Coinexchange',
        component: Coinexchange

    },
    {
        path: '/consulting',
        name: 'Consulting',
        component: Consulting

    },
    // 个人中心
    {
        path: '/usercenter',
        name: 'Usercenter',
        component: Usercenter,
        redirect: '/usercenter/userinfo',
        // 子路由
        children: [
            // 个人信息
            {
                path: '/usercenter/userinfo',
                name: 'Userinfo',
                component: Userinfo
            },
            // 金币记录
            {
                path: '/usercenter/coincord',
                name: 'Coincord',
                component: Coincord,
   	redirect: '/usercenter/coincord/input',
	children: [{
                        path: '/usercenter/coincord/input',
                        name: 'Input',
                        component: Input
                    },
                    {
                        path: '/usercenter/coincord/output',
                        name: 'Output',
                        component: Output
                    },
                ]
            },
            // 刷牙闹钟
            {
                path: '/usercenter/power',
                name: 'Power',
                component: Power
            },
            // 权利中心
            {
                path: '/usercenter/clock',
                name: 'Clock',
                component: Clock
            },
        ]
    },
    // 个人主页下的个人信息下的路由
    // 修改出生年月日路由
    {
        path: '/usercenter/editage',
        name: 'Editage',
        component: Editage
    },
    // 修改密码路由
    {
        path: '/usercenter/editpassword',
        name: 'Editpassword',
        component: Editpassword
    },
    // 修改密码路由
    {
        path: '/usercenter/editnewpass',
        name: 'Editnewpass',
        component: Editnewpass
    },
    // 修改性别路由
    {
        path: '/usercenter/editsex',
        name: 'Editsex',
        component: Editsex
    },
    // 修改蛀牙路由
    {
        path: '/usercenter/editteeth',
        name: 'Editteeth',
        component: Editteeth
    },
    // 修改蛀牙路由
    {
        path: '/usercenter/edityesteeth',
        name: 'Edityesteeth',
        component: Edityesteeth
    },
    // 修改用户名路由
    {
        path: '/usercenter/editusername',
        name: 'Editusername',
        component: Editusername
    },
    // 修改美白度路由
    {
        path: '/usercenter/editwhite',
        name: 'Editwhite',
        component: Editwhite
    },
    // 首页路由
    {
        path: '/index',
        name: 'Index',
        component: Index,
        redirect: '/index/first',
        // 首页下的四个子路由
        children: [
            // 首页
            {
                path: '/index/first',
                name: 'First',
                component: First
            },
            // 历史记录
            {
                path: '/index/history',
                name: 'History',
                component: History
            },
            // 勋章
            {
                path: '/index/medal',
                name: 'Medal',
                component: Medal
            },
            // 薯粉
            {
                path: '/index/fans',
                name: 'Fans',
                component: Fans,
                redirect: '/index/fans/shop',
                children: [{
                        path: '/index/fans/shop',
                        name: 'Shop',
                        component: Shop
                    },
                    {
                        path: '/index/fans/activities',
                        name: 'Activities',
                        component: Activities
                    },
                ]
            },
        ]
    },
      //历史记录
      {
        path: '/history',
        name: 'History',
        component: History,
        redirect: '/history/day',
        // 子路由
        children: [
            // 日
            {
                path: '/history/day',
                name: 'Day',
                component: Day
            },
            {
                path:'/history/mor',
                name:'Mor',
                component:Mor
            },
            {
                path:'/history/tmor',
                name:'Tmor',
                component:Tmor
            },
            // 周
            {
                path: '/history/week',
                name: 'Week',
                component: Week
            },
            // 月
            {
                path: '/history/month',
                name: 'Month',
                component: Month
            },
            // 季
            {
                path: '/history/quarter',
                name: 'Quarter',
                component: Quarter
            },
        ]
    },
  // 首页底下的跳转路由
    // 刷牙详情
    {
        path: '/index/first/brush',
        name: 'Brush',
        component: Brush
    },
    // 如何正确刷牙
    {
        path: '/index/first/howbrush',
        name: 'Howbrush',
        component: Howbrush
    },
  // 剩余电量
    {
        path: '/index/first/electric',
        name: 'Electric',
        component: Electric
    },
     // 设备详情
    {
        path: '/index/first/device',
        name: 'Device',
        component: Device
    },
    // 设备详情
    {
        path: '/index/first/bindon',
        name: 'Bindon',
        component: Bindon
    },
 // 配对牙刷
    {
        path: '/index/first/pair',
        name: 'Pair',
        component: Pair
    },
    // 刷头详情
    {
        path: '/index/first/brushhead',
        name: 'Brushhead',
        component: Brushhead
    },
    // 智能刷头
    {
        path: '/index/first/IThead',
        name: 'IThead',
        component: IThead
    },
 // 为什么要更换刷头？
    {
        path: '/index/first/whyexchange',
        name: 'Whyexchange',
        component: Whyexchange
    },
    // 素士总评
    {
        path: '/index/first/share',
        name: 'Share',
        component: Share
    },
]

const router = new VueRouter({
    routes
})

export default router